package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class MatchPredicatePart2 implements WhenOperand {

    private int beginIndex;
    private int endIndex;
    private boolean unique;
    private boolean simple;
    private boolean partial;
    private boolean full;
    private Subquery tableSubquery;

    public MatchPredicatePart2(int beginIndex,
                               boolean unique,
                               boolean simple,
                               boolean partial,
                               boolean full,
                               Subquery tableSubquery) {
        this.beginIndex = beginIndex;
        this.endIndex = tableSubquery.getEndIndex();
        this.unique = unique;
        this.simple = simple;
        this.partial = partial;
        this.full = full;
        this.tableSubquery = tableSubquery;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public boolean isUnique() {
        return unique;
    }

    public boolean isSimple() {
        return simple;
    }

    public boolean isPartial() {
        return partial;
    }

    public boolean isFull() {
        return full;
    }

    public Subquery getTableSubquery() {
        return tableSubquery;
    }

}
